home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15291 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: news-1.csn.net!ncar!usenet
  2. From: James Adams <jadams@ucar.edu>
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Code Organization - seeking reference
  5. Date: 4 Apr 1996 17:51:27 GMT
  6. Organization: National Center for Atmospheric Research/Boulder, CO
  7. Message-ID: <4k126v$bvq@ncar.ucar.edu>
  8. NNTP-Posting-Host: mayfly.cgd.ucar.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; IRIX 5.3 IP22)
  13. X-URL: news:comp.lang.c
  14.  
  15. Hello,
  16.  
  17.     I have never had a firm grasp of the accepted code organization
  18. practices for C (and now C++).  What I'm referring to are issues such as
  19. where I should include include files, declarations, and function definitions
  20. in my source files.  For example it seems redundant to include stdio.h in
  21. every source file, why not just once in the main header file ?  I have used
  22. more than one method of code organization and they have each worked, but I
  23. would like to finally begin using the conventional code orginization practice,
  24. if there is one.  
  25.  
  26.     Please let me know (via email preferably) if you know of a reference
  27. which addresses this topic.  This was never spelled out to me when I was
  28. first learning C, and now that I am learning C++ it is again confusing me
  29. (for example header files seem to be the accepted place for class and
  30. inline function definitions in C++, whereas I was under the assumption that
  31. header files were primarily for declarations of user defined types).  I have
  32. yet to find any introductory C or C++ book which spells out the correct way
  33. to organize the code, perhaps there are some which have this information
  34. included along with the various other topics.  I'm hoping there is a reference
  35. out there which deals with this in one section.
  36.  
  37.     Thanks in advance for any pointers or insight !
  38.  
  39.  
  40. -James    
  41. -- 
  42. ---------------------------------------------------------------------------
  43. James Adams                               Email: jadams@ucar.edu
  44. National Center for Atmospheric Research  Phone: (303) 497-1356
  45. Boulder, Colorado                         Fax:   (303) 497-1348
  46.  
  47.     WWW:  http://www.cgd.ucar.edu/ccr/jadams/home.html
  48.  
  49.